package com.chen.testfluentvalidator;

import com.baidu.unbiz.fluentvalidator.Validator;
import com.baidu.unbiz.fluentvalidator.ValidatorContext;
import com.baidu.unbiz.fluentvalidator.ValidatorHandler;


/**
 *TODO
 *@author：email: <a href="cyb@ewppay.com"> Administrator </a> 
 *@Date 2017-4-24 下午4:01:47 
 */

public class CarManufacturerValidator extends ValidatorHandler<String> implements Validator<String>{

	@Override
	public boolean validate(ValidatorContext context, String t) {
		if (t != "test") {
            context.addErrorMsg(String.format("Seat count is not valid, invalid value=%s", t));
            return false;
        }
        return true;
	}
	
}
